package com.tanhua.model.mongo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.codecs.pojo.annotations.BsonIgnore;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.List;

/**
 * 试题表
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "question")
public class Question implements Serializable {
    private ObjectId id; //试题id
    private ObjectId questionnaireId; //所属问卷id
    private String question; //题目
    @BsonIgnore
    private List<Option> options;   //选项
}
